<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="cw" uri="/widget-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<script type="text/javascript">
	function doCalc(){
		var aac001 = Ext.getCmp('aac001_hidden').getValue();
		if(aac001 == '') {Ext.Msg.alert('提示','请先查询人员审批信息'); return;}
		var bic008 = Ext.getCmp('bic008_cmp').getValue();
		var bic009 = Ext.getCmp('bic009_cmp').getValue();
		var bic043 = Ext.getCmp('bic043_cmp').getValue();
		var bic044 = Ext.getCmp('bic044_cmp').getValue();
		var bia001 = Ext.getCmp('bia001_cmp').getValue();
		var aic164 = Ext.getCmp('aic164_cmp').getValue();
		var aic162 = Ext.getCmp('aic162_cmp').getValue();
		aic162 = aic162.format('Ym');
		Wonders.utils.formLoad('calcform', 
				'${pageContext.request.contextPath}/i1/f30120201/corpRetireBfItemCalc.action', 
				{aac001:aac001,bic008:bic008,bic009:bic009,bic043:bic043,bic044:bic044,bia001:bia001,aic164:aic164,aic162:aic162},
				function(form,action){
					Ext.getCmp('submit_button').enable();
					var detailResults = getFormValue(action,'detailResults');
					loadGridData('dymxGrid',detailResults);
					
					Ext.getCmp('aac057_cmp').setValue(getFormValue(action,'aac057'));
                    Ext.getCmp('aac026_cmp').setValue(getFormValue(action,'aac026'));
                    Ext.getCmp('aic166_cmp').setValue(getFormValue(action,'aic166'));
                    Ext.getCmp('aic167_cmp').setValue(getFormValue(action,'aic167'));
                    Ext.getCmp('bic015_cmp').setValue(getFormValue(action,'bic015'));
                    Ext.getCmp('bic067_cmp').setValue(getFormValue(action,'bic067'));
                    Ext.getCmp('bic066_cmp').setValue(getFormValue(action,'bic066'));
                    Ext.getCmp('bic065_cmp').setValue(getFormValue(action,'bic065'));
                    Ext.getCmp('bic064_cmp').setValue(getFormValue(action,'bic064'));
                    Ext.getCmp('bic063_cmp').setValue(getFormValue(action,'bic063'));
		  			Ext.getCmp('bic062_cmp').setValue(getFormValue(action,'bic062'));
		   			Ext.getCmp('bic061_cmp').setValue(getFormValue(action,'bic061'));
		      		Ext.getCmp('bic060_cmp').setValue(getFormValue(action,'bic060'));
		        	Ext.getCmp('bic059_cmp').setValue(getFormValue(action,'bic059'));
		          	Ext.getCmp('bic058_cmp').setValue(getFormValue(action,'bic058'));
		          	Ext.getCmp('bic057_cmp').setValue(getFormValue(action,'bic057'));
					Ext.getCmp('bic056_cmp').setValue(getFormValue(action,'bic056'));
					Ext.getCmp('bic055_cmp').setValue(getFormValue(action,'bic055'));
					Ext.getCmp('bic054_cmp').setValue(getFormValue(action,'bic054'));
					Ext.getCmp('bic068_cmp').setValue(getFormValue(action,'bic068'));
					Ext.getCmp('bic069_cmp').setValue(getFormValue(action,'bic069'));
					Ext.getCmp('bac077_cmp').setValue(getFormValue(action,'bac077'));
					Ext.getCmp('bic083_cmp').setValue(getFormValue(action,'bic083'));
					Ext.getCmp('bic084_cmp').setValue(getFormValue(action,'bic084'));
					Ext.getCmp('bic085_cmp').setValue(getFormValue(action,'bic085'));
					
					
					//待遇计算ID,需提交
					Ext.getCmp('baz039_hidden').setValue(getFormValue(action,'baz039'));
				}
		,null,function(options,response){
		        
			});
	}
</script>
<table width="100%" border="0" >
	<tr>
		<td nowrap="nowrap" align="center">
			<cw:button text="计算待遇" onclick="doCalc();" id="button_calc"></cw:button>
		</td>
	</tr>
</table>
<div id="fs_calc" style="margin: 0 0 0 0">
<cw:grid url="#" id="dymxGrid" enablePage="false" title="待遇计算组成" forceFit="true" 
	autoLoad="false" showGlobalStat="true" summaryText="汇总">
	<cw:indexColumn indexWidth="60"/>
	<cw:gridColumn property="aaa036" width="100" title="待遇项目"  align="center"></cw:gridColumn>
	<cw:gridColumn property="aaa085" width="60" title="定期标志" align="center"></cw:gridColumn>
	<cw:gridColumn property="bae019" width="1" title="待遇发放标志(隐藏)" hidden="true"></cw:gridColumn>
	<cw:gridColumn property="aae041" width="60" title="开始年月" align="center"></cw:gridColumn>
	<cw:gridColumn property="aae042" width="60" title="终止年月" align="center"></cw:gridColumn>
	<cw:gridColumn property="aae129" width="110" title="核发金额" align="center"
		summaryParser="value" summaryType="sum" summaryDecimalPrecision="2"></cw:gridColumn>
	<cw:gridColumn property="bae134" width="110" title="个人帐户支付金额" align="center"
		summaryParser="value" summaryType="sum" summaryDecimalPrecision="2"></cw:gridColumn>
	<cw:gridColumn property="bae011" width="200" title="计算过程" align="center"></cw:gridColumn>
	<cw:gridColumn property="baz039" width="1" title="待遇计算ID(隐藏)" hidden="true"></cw:gridColumn>
	<cw:gridColumn property="aae140" width="120" title="险种类型" align="center" hidden="true"></cw:gridColumn>
	<cw:gridColumn property="baz057" width="1" title="代发代扣类型ID（隐藏）" hidden="true"></cw:gridColumn>
</cw:grid>
</div>
<div id="fs_calc1" style="margin: 0 0 0 0">
	<table width="100%" border="0" >
    <COLGROUP>
			<COL width='10%' align="right">
			<COL width='20%' align="left">
			<COL width='10%' align="right">
			<COL width='20%' align="left">
			<COL width='10%' align="right">
			<COL width='30%' align="left">
	</COLGROUP>
	<tr height="23">
		<td nowrap="nowrap">
			原基础养老金:
		</td>
		<td>
		<cw:number property="bic056" id="bic056_cmp" decimalPrecision="2" allowDecimals="true" readOnly="true"></cw:number>
		</td>
		<td nowrap="nowrap">
			原个人账户养老金:
		</td>
		<td>
			<cw:number property="bic057" id="bic057_cmp" decimalPrecision="2" allowDecimals="true" readOnly="true"></cw:number>
		</td>
		<td nowrap="nowrap">
			原过渡养老金:
		</td>
		<td>
			<cw:number property="bic068" id="bic068_cmp" decimalPrecision="2" allowDecimals="true" readOnly="true"></cw:number>
		</td>
	</tr>
	<tr height="23">
		<td nowrap="nowrap">
			原调节金:
		</td>
		<td>
			<cw:number property="bic058" id="bic058_cmp" decimalPrecision="2" allowDecimals="true" readOnly="true"></cw:number>
		</td>
		<td nowrap="nowrap">
			原1999增发:
		</td>
		<td>
			<cw:number property="bic059" id="bic059_cmp" decimalPrecision="2" allowDecimals="true" readOnly="true"></cw:number>
		</td>
		<td nowrap="nowrap">
			原病退减发:
		</td>
		<td>
			<cw:number property="bic060" id="bic060_cmp" decimalPrecision="2" allowDecimals="true" readOnly="true"></cw:number>
		</td>
	</tr>	
	<tr height="23">
		<td nowrap="nowrap">
			最低标准补足额:
		</td>
		<td nowrap="nowrap">
			<cw:number property="bic083" id="bic083_cmp" decimalPrecision="2" allowDecimals="true" readOnly="true"></cw:number>
		</td>
		<td nowrap="nowrap">
			原基本养老金合计:
		</td>
		<td nowrap="nowrap">
			<cw:number property="bic061" id="bic061_cmp" decimalPrecision="2" allowDecimals="true" readOnly="true"></cw:number>
		</td>
	</tr>
</table></div>
<div id="fs_calc2" style="margin: 0 0 0 0">
	<table width="100%" border="0" >
    <COLGROUP>
			<COL width='10%' align="right">
			<COL width='20%' align="left">
			<COL width='10%' align="right">
			<COL width='20%' align="left">
			<COL width='10%' align="right">
			<COL width='30%' align="left">
	</COLGROUP>
	<tr height="23">
		<td nowrap="nowrap">
			现基础养老金:
		</td>
		<td>
			<cw:number property="bic062" id="bic062_cmp" decimalPrecision="2" allowDecimals="true" readOnly="true"></cw:number>
		</td>
		<td nowrap="nowrap">
			现个人账户养老金:
		</td>
		<td>
			<cw:number property="bic063" id="bic063_cmp" decimalPrecision="2" allowDecimals="true" readOnly="true"></cw:number>
		</td>
		<td nowrap="nowrap">
			新过渡性养老金:
		</td>
		<td>
			<cw:number property="bic069" id="bic069_cmp" decimalPrecision="2" allowDecimals="true" readOnly="true"></cw:number>
		</td>
	</tr>
	<tr height="23">
		<td nowrap="nowrap">
			现基本养老金合计:
		</td>
		<td colspan="5">
			<cw:number property="bac077" id="bac077_cmp" decimalPrecision="2" allowDecimals="true" readOnly="true"></cw:number>
		</td>
	</tr>
</table></div>
<div id="fs_calc3" style="margin: 0 0 0 0">
	<table width="100%" border="0" >
    <COLGROUP>
		<COL width='10%' align="right">
		<COL width='20%' align="left">
		<COL width='10%' align="right">
		<COL width='20%' align="left">
		<COL width='10%' align="right">
		<COL width='30%' align="left">
	</COLGROUP>
	<tr height="23">
		<td nowrap="nowrap">
			过渡期扣除金额:
		</td>
		<td>
			<cw:number property="bic065" id="bic065_cmp" decimalPrecision="2" allowDecimals="true" readOnly="true"></cw:number>
		</td>
		<td nowrap="nowrap">
			过渡期增发比例:
		</td>
		<td>
			<cw:number property="bic066" id="bic066_cmp" decimalPrecision="2" allowDecimals="true" readOnly="true"></cw:number>
		</td>
		<td nowrap="nowrap">
			过渡期增发金额:
		</td>
		<td>
			<cw:number property="bic067" id="bic067_cmp" decimalPrecision="2" allowDecimals="true" readOnly="true"></cw:number>
		</td>
	</tr>
	<tr height="23">
	    <td nowrap="nowrap">
			未参保定额：
		</td>
		<td>
			<cw:number property="bic084" id="bic084_cmp" decimalPrecision="2" allowDecimals="true" readOnly="true"></cw:number>
		</td>
		<td nowrap="nowrap">
			视同年限增发:
		</td>
		<td>
			<cw:number property="bic085" id="bic085_cmp" decimalPrecision="2" allowDecimals="true" readOnly="true"></cw:number>
		</td>
		<td nowrap="nowrap">
			最终核定基本养老</br>金金额:
		</td>
		<td colspan="5">
			<cw:number property="bic015" id="bic015_cmp" decimalPrecision="2" allowDecimals="true" readOnly="true"></cw:number>
		</td>
</tr></table>
</div>
<cw:fieldSet id="fs_calc2" title="139号令计算结果" checkboxToggle="false"
	collapsible="true" content="fs_calc1" autoHeight="true"></cw:fieldSet>
<cw:fieldSet id="fs_calc3" title="36号令计算结果" checkboxToggle="false"
	collapsible="true" content="fs_calc2" autoHeight="true"></cw:fieldSet>
<cw:fieldSet id="fs_calc4" title="过渡期内新老办法对比" checkboxToggle="false"
	collapsible="true" content="fs_calc3" autoHeight="true"></cw:fieldSet>
<cw:fieldSet id="fs_calc1" title="待遇组成计算过程" checkboxToggle="false"
	collapsible="true" content="fs_calc" autoHeight="true" collapsed="true"></cw:fieldSet>